/*Replication file for Lyons Utych 2021
You're Not From Here
Political Behavior
Study 2*/

*Use study2.dta

*Figure 3

reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354&urban==1, cluster(rid)
est sto Urban
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354&urban==3, cluster(rid)
est sto Rural

coefplot Urban Rural, drop(_cons) level(90) xline(0) ti("Figure 3. Allocation Decisions - Urban and Rural Respondents") coeflabels(urbanc = "Urban" ruralc = "Rural" copartm = "Co-Partisan Mayor" outpartm = "Out-Partisan Mayor" y2006 = "2006 Invest" y2018 = "2018 Invest" lowblk = "5% Black" hiblk = "65% Black" rich = "$90,000 HH Income" poor = "$30,000 HH Income" citya = "City A")scheme(sj)

*Figure 4
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya  if timing>5.354&rdem==1, cluster(rid)
est sto Democrats
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya  if timing>5.354&rgop==1, cluster(rid)
est sto Republicans

coefplot Democrats Republicans, drop(_cons citya) level(90) xline(0) ti("Figure 4. Allocation Decisions by Partisanship") coeflabels(urbanc = "Urban" ruralc = "Rural" copartm = "Co-Partisan Mayor" outpartm = "Out-Partisan Mayor" y2006 = "2006 Invest" y2018 = "2018 Invest" lowblk = "5% Black" hiblk = "65% Black" rich = "$90,000 HH Income" poor = "$30,000 HH Income")scheme(sj)


*Appendix Materials

*Figure A1
logit alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya, cluster(rid)
est sto binary
coefplot binary, drop(_cons) level(90) xline(0) ti("Figure A1. Allocation Decisions - Include Fast Responses)") coeflabels(urbanc = "Urban" ruralc = "Rural" copartm = "Co-Partisan Mayor" outpartm = "Out-Partisan Mayor" y2006 = "2006 Invest" y2018 = "2018 Invest" lowblk = "5% Black" hiblk = "65% Black" rich = "$90,000 HH Income" poor = "$30,000 HH Income" citya = "City A")scheme(sj)

*Figure A2
logit alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354, cluster(rid)
est sto binary
coefplot binary, drop(_cons) level(90) xline(0) ti("Figure A2. Allocation Decisions - Full Sample (Logit)") coeflabels(urbanc = "Urban" ruralc = "Rural" copartm = "Co-Partisan Mayor" outpartm = "Out-Partisan Mayor" y2006 = "2006 Invest" y2018 = "2018 Invest" lowblk = "5% Black" hiblk = "65% Black" rich = "$90,000 HH Income" poor = "$30,000 HH Income" citya = "City A")scheme(sj)

*Figure A3
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if urban==1, cluster(rid)
est sto Urban
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if urban==3, cluster(rid)
est sto Rural

coefplot Urban Rural, drop(_cons) level(90) xline(0) ti("Figure A3. Allocation Decisions - Urban and Rural Respondents" "(Include Fast Responses))") coeflabels(urbanc = "Urban" ruralc = "Rural" copartm = "Co-Partisan Mayor" outpartm = "Out-Partisan Mayor" y2006 = "2006 Invest" y2018 = "2018 Invest" lowblk = "5% Black" hiblk = "65% Black" rich = "$90,000 HH Income" poor = "$30,000 HH Income" citya = "City A")scheme(sj)

*Figure A4
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya  if rdem==1, cluster(rid)
est sto Democrats
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya  if rgop==1, cluster(rid)
est sto Republicans

coefplot Democrats Republicans, drop(_cons citya) level(90) xline(0) ti("Figure A4. Allocation Decisions by Partisanship" "(Include Fast Respondents)") coeflabels(urbanc = "Urban" ruralc = "Rural" copartm = "Co-Partisan Mayor" outpartm = "Out-Partisan Mayor" y2006 = "2006 Invest" y2018 = "2018 Invest" lowblk = "5% Black" hiblk = "65% Black" rich = "$90,000 HH Income" poor = "$30,000 HH Income")scheme(sj)

*Use study2goodip.dta

*Figure A5
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354, cluster(rid)
est sto binary
coefplot binary, drop(_cons) level(90) xline(0) ti("Figure A5. Allocation Decisions - Full Sample (remove bad IPs)") coeflabels(urbanc = "Urban" ruralc = "Rural" copartm = "Co-Partisan Mayor" outpartm = "Out-Partisan Mayor" y2006 = "2006 Invest" y2018 = "2018 Invest" lowblk = "5% Black" hiblk = "65% Black" rich = "$90,000 HH Income" poor = "$30,000 HH Income" citya = "City A" _cons="Constant")scheme(sj)

*Figure A6
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya  if timing>5.354&rdem==1, cluster(rid)
est sto Democrats
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya  if timing>5.354&rgop==1, cluster(rid)
est sto Republicans

coefplot Democrats Republicans, drop(_cons citya) level(90) xline(0) ti("Figure A6. Allocation Decisions by Partisanship (remove bad IP)") coeflabels(urbanc = "Urban" ruralc = "Rural" copartm = "Co-Partisan Mayor" outpartm = "Out-Partisan Mayor" y2006 = "2006 Invest" y2018 = "2018 Invest" lowblk = "5% Black" hiblk = "65% Black" rich = "$90,000 HH Income" poor = "$30,000 HH Income")scheme(sj)

*Figure A7
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354&urban==1, cluster(rid)
est sto Urban
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354&urban==3, cluster(rid)
est sto Rural

coefplot Urban Rural, drop(_cons) level(90) xline(0) ti("Figure A7. Allocation Decisions - Urban and Rural Respondents (remove bad IP") coeflabels(urbanc = "Urban" ruralc = "Rural" copartm = "Co-Partisan Mayor" outpartm = "Out-Partisan Mayor" y2006 = "2006 Invest" y2018 = "2018 Invest" lowblk = "5% Black" hiblk = "65% Black" rich = "$90,000 HH Income" poor = "$30,000 HH Income" citya = "City A")scheme(sj)

*use study2.dta
*Table B3
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354, cluster(rid)
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354&urban==1, cluster(rid)
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354&urban==3, cluster(rid)
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya  if timing>5.354&rdem==1, cluster(rid)
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya  if timing>5.354&rgop==1, cluster(rid)

*use study2goodip.dta
*Table B4
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354, cluster(rid)
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354&urban==1, cluster(rid)
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354&urban==3, cluster(rid)
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya  if timing>5.354&rdem==1, cluster(rid)
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya  if timing>5.354&rgop==1, cluster(rid)

*use study2.dta
*Table B5
logit alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354, cluster(rid)
logit alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354&urban==1, cluster(rid)
logit alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if timing>5.354&urban==3, cluster(rid)
logit alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya  if timing>5.354&rdem==1, cluster(rid)
logit alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya  if timing>5.354&rgop==1, cluster(rid)

*Table B6
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya, cluster(rid)
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if urban==1, cluster(rid)
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya if urban==3, cluster(rid)
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya  if rdem==1, cluster(rid)
reg alloc urbanc ruralc copartm outpartm y2006 y2018 lowblk hiblk rich poor citya  if rgop==1, cluster(rid)
